<aside class="col-lg-3 col-sm-4 hidden-xs">
    <% if (!user) { %>
    <div class="no-login">
        <button class="btn btn-primary" id="blog-login">登录 | login</button>
        <div class="line"></div>
        <button class="btn btn-default" id="join-btn">申请加入我们</button>
    </div>
    <% } else { %>
    <div class="has-login">
        <div class="user-bg">
            <div class="user-icon"><a href="/blog/user/<%= user['_id'] %>"><img src="/dist/img/icon/<%= user.usericon %>"></a></div>
            <p><%= user.username %></p>
        </div>
        <div class="mes">
            <div class="item">
                <h3>文章</h3>
                <p><%= user.articleNum %></p>
            </div>
            <div class="item">
                <h3>推荐</h3>
                <p><%= user.thumbedNum %></p>
            </div>
            <div class="item">
                <h3>浏览</h3>
                <p><%= user.visitedNum %></p>
            </div>
        </div>
        <div class="new-article">
            <a href="/blog/new" class="btn btn-primary">发表文章</a>
        </div>
    </div>


    <div class="other clearfix">
        <a href="/blog/message" class="item">
            <span class="eux-icon eux-icon-bell"></span><span>未读消息<% if(typeof mesNumNotRead != 'undefined' && mesNumNotRead) { %><span class="mes-num"><%= mesNumNotRead %></span> <% } %></span>
            <span>查看</span>
        </a>
        <a href="/blog/collect" class="item">
            <span class="eux-icon eux-icon-star"></span><span>收藏 <% if(typeof collectNum != 'undefined') { %>(<%= collectNum %>) <% } %></span>
            <span>查看</span>
        </a>
    </div>

    <% } %>

</aside>

<script src="/dist/js/blog/aside.min.js"></script>
